﻿using System;
using System.Collections.Generic;
using System.Text;
using BaseHelper.Base;
using BaseHelper.Net;

namespace DeviceSDK.Camera
{
    public class CameraHelper
    {

        //设备-获取-状态
        public int Get_Status(string FirmModelIDName, string IP)
        {
            return PingHelper.Get_Status(IP) ? 0 : 1;
        }


        //获取直播流
        public static string Get_RtspUrl(string FirmModelIDName, string IP, string UserName, string PassWord, string Port,bool IsMainSteam=false)
        {
            string ret = "";

            if (FirmModelIDName.Contains("HAIKANG"))
            {
                ret = string.Format("rtsp://{0}:{1}@{2}:{3}/ch1/{4}/av_stream", UserName, PassWord, IP, Port, IsMainSteam?"main":"sub");
            }

            return ret;
        }
    }
}
